<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.easidea.tim.service.saleorder.SaleOrderService"%>
<%@page import="org.springframework.web.context.WebApplicationContext"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="com.easidea.tim.entity.saleorder.SaleOrder"%>
<%@page import="com.easidea.tim.entity.saleorder.SaleOrderItem"%>
<%@page import="com.easidea.tim.dao.saleorder.SaleOrderItemDao"%>
<%@page import="com.easidea.tim.service.inventory.StorageService"%>
<%@page import="org.hibernate.Session"%>
<%
	String name = request.getParameter("name").toString();
	String color = request.getParameter("color").toString();
	String pinum = request.getParameter("pinum").toString();

	int pi = new Integer(pinum).intValue();
	
 %>
<?xml version="1.0" encoding="GB2312"?> 
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<script type="text/javascript">
<!--
	function dosubmit(){
		
		var meterstring = "";
		var flowno = document.meterAction.flowno.value;
		var intype = document.meterAction.intype.value;
		
		if(flowno == null||flowno == ''){
			alert("请填写订单编号");
			return false;
		}
		
		for(var i=0;i<<%=pi%>;i++){   
			var j = i.toString() ;                  
			meterstring+=document.getElementById('meternum'+j).value+ ","; 
		}
		document.meterAction.action="incharge_form.jsp?meterstring="+meterstring+"&name=<%=name%>&color=<%=color%>&flowno="+flowno+"&pi=<%=pinum%>&intype="+intype+"";
		document.meterAction.submit();
	}
//-->
</script>
<wml>
<card title="入库">
		产品名称：<%=name %>
		产品色号：<%=color %>
		
	   <form name="meterAction" method="post" action="">	
	<table columns="6" align="left">
	<tr align="left">
	  	 <td>
		     订单流水号：
	     <INPUT type="text" id="flowno" name="flowno"/></td>
	   </tr>
	   <tr align="left">
	  	 <td>
		入库类型：
		<select name="intype">
			<option value="1">采购入库</option>
			<option value="2">退货入库</option>
			<option value="3">剪样新增入库</option>
			<option value="4">剪样销售退回入库</option>
			<option value="5">剪样领用退回入库</option>
			<option value="6">盘盈调整</option>
			
		</select>
		</td>
	   </tr>
		详细米数：

	<%
		for(int i =0;i <pi;i++){
	 %>
	 
	  <tr align="left">
	  	 <td>米数：<input type="text" id="meternum<%=i %>"  width="100" maxlength="50"/></td>
	   </tr>
<%
}
 %>
	   </table>
	    <td><input type="button" value="确定" onclick="dosubmit();"></input></td></tr>
	   </form>
	</card>
	</wml>
 
